/**
 * Filename: PopMenuItem.java
 * @author  Firefly
 * @contact postfirefly@163.com
 * @time    2016/6/27 15:09
 */
package com.github.postsanf.yinian.activity.pop;

import android.content.Context;
import android.graphics.drawable.Drawable;

/**
 *  弹窗内部子项
 */
public class PopMenuItem{
	// 定义图片对象
	public Drawable mDrawable;
	// 定义文本对象
	public CharSequence mTitle;

	public PopMenuItem(Drawable drawable, CharSequence title) {
		this.mDrawable = drawable;
		this.mTitle = title;
	}

	public PopMenuItem(Context context, int titleId, int drawableId) {
		this.mTitle = context.getResources().getText(titleId);
		this.mDrawable = context.getResources().getDrawable(drawableId);
	}

	public PopMenuItem(Context context, CharSequence title, int drawableId) {
		this.mTitle = title;
		this.mDrawable = context.getResources().getDrawable(drawableId);
	}

	public PopMenuItem(Context context, CharSequence title) {
		this.mTitle = title;
		this.mDrawable = null;
	}
}
